/*
 * @Description:
 * @Version: 2.0
 * @Autor: invinci_tao
 * @Date: 2022-05-12 10:15:47
 * @LastEditors: invinci_tao
 * @LastEditTime: 2022-05-27 15:14:05
 */
import { fileURLToPath, URL } from "url";

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", import.meta.url)),
    },
  },
  // 在这里可以理解为把这两个文件设置为全局变量
  css: {
    preprocessorOptions: {
      less: {
        additionalData: `
          @import '@/assets/styles/mixins.less';
          @import '@/assets/styles/variables.less';
        `,
      },
    },
  }
});

